#########################################################################
#									#
# Name:	 	ip_move_interface.pm (Perl Module)			#
#									#
# Completed:	8th October, 2003.					#
#									#
# Updated:	9th February, 2005.					#
#									#
# Author:	Simon Edwards, Linuxha.net				#
#									#
# Arguments:	N/A							#
#									#
# Purpose:	This modules is a LEMS module that is used to move the	#
#		IP address from one interface to another - normally	#
#		dormant of course! See the notes below for more		#
#		information.						#
#									#
# Limitations:								#
#									#
# Environment:	None.							#
#									#
# Exit Codes:	N/A							#
# 									#
# Version:	@(#)1.0.0 Original (SE)>				#
# 		@(#)1.0.1 Support for IPinterfaces module (SE)>		#
# 		@(#)1.0.2 Added stat routine for status reporting (SE)>	#
# 		@(#)1.0.3 Improved ip failure handling (SE)>		#
# 		@(#)1.0.4 Correct 'balence' typo (SE)>			#
#			Added accept method to allow the following:	#
#			"failover" - see notes below			#
#		@(#)1.0.5 Return undef when app using bonding config>	#
#		@(#)1.0.6 Added locking support (SE)>			#
#		@(#)1.0.7 DRBD support (SE)>				#
#		@(#)1.0.8 Changed frequency and maxfailover defaults>	#
#		@(#)1.0.9 Added messages for above (SE)>		#
#		@(#)1.1.0 Changes for 0109 (SE)>			#
#		@(#)1.1.1 Fix for bug 0202 (SE)>			#
#		@(#)1.1.2 Improve message output for ip_move (SE)>	#
#		@(#)1.1.3 Implement improvement 0214 (SE)>		#
#		@(#)1.1.4 No longer needed, so remove code (SE)>	#
#									#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
#									#
# Complete SOCM Version History						#
#									#
# Version:	1.0.0							#
# Date:		7th October, 2003.					#
# Author:	Simon Edwards, Proprius Consulting Ltd.			#
# Change:	Original.						#
#									#
# Version:	1.0.2							#
# Date:		26th November, 2003.					#
# Author:	Simon Edwards, Proprius Consulting Ltd.			#
# Change:	Implemented the stat function which can be called to	#
#		get detailed status information on the status of the	#
#		module.							#
#									#
#########################################################################
#								

#########################################################################
# This is the ip_move_interface module. It is only run when the 	#
# ip_module or link_module find an error with the current configuration.#
# 									#
# It is expected to use the following return codes:			#
# 0	The package has been moved across to a different interface,	#
#	do not call this check again (unless there is a problem,	#
#	of course).							#
# 1	It has been determined that either no interface is available,	#
#	or the interface has been swapped too often to consider this	#
#	node viable for this network connection any longer.		#
#									#
# Object instantion arguments:						#
# package	The name of the application - must be present.		#
# resetfreq	The age after which a previous IP address fail-over	#
#		is ignored from the calculations as to whether an 	#
#		interface should be considered again.			#
#		If no specified it will default to 3600 (1 hour).	#
#									#
#########################################################################

package ip_move_interface;

use Sys::Hostname;

BEGIN {
	push @INC,"/usr/local/cluster/lib/perl";
}

use Net::Ping;
use XML::Simple;
use ipinterfaces;
use clutils;
use cldlockc;

sub new {
my $self={};

	::errmsg("The ip_move_interface module is no longer needed from ");
	::errmsg("Linuxha.net v0.8.3 since this functionality is handled");
	::errmsg("by the cluster Network Daemon.");
	return undef;
}


sub check {
my $self=shift;

	return 0;
}

sub stat {
my $self=shift;

	return "";
}

1;
